using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ConpentnentTrigger : TriggerBase
{
    public ItemDataSO _itemDataSO;
    protected override void OnTriggerEnter2D(Collider2D other)
    {
        base.OnTriggerExit2D(other);
        if (other.CompareTag("Player") == false)
            return;
        other.GetComponent<PlayerInventory>().AddInventoryItem(_itemDataSO);
        Destroy(gameObject);
    }
}
